<template>
	<view>
		<map style="width: 100%; height: 100%;">
		</map>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		mounted() {
			uni.chooseLocation({
				success: function (res) {
					console.log('位置名称' + res.name);
					console.log('详细地址：' + res.address);
					console.log('纬度：' + res.latitude);
					console.log('经度：' + res.longitude);
				}
			});
			return;
			uni.getLocation({
				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
				success: function (res) {
					const latitude = res.latitude;
					const longitude = res.longitude;
					uni.openLocation({
						latitude: latitude,
						longitude: longitude,
						success: function () {
							console.log('success');
						}
					});
				}
			});
			return;
			
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
